package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-07-03
 * Time: 14:32
 */
public class Book {
    private String name;
    private String suthor;
    private String type;
    private int price;
    private boolean isBrrowed;


    public Book(String name, String author, int price,String type) {
        this.name = name;
        this.suthor = author;
        this.price = price;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSuthor() {
        return suthor;
    }

    public void setSuthor(String suthor) {
        this.suthor = suthor;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public boolean isBrrowed() {
        return isBrrowed;
    }

    public void setBrrowed(boolean brrowed) {
        isBrrowed = brrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", suthor='" + suthor + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price +" "+
                ((isBrrowed == true)?"已借出":"未借出")+
                '}';
    }
}
